import request from '@/utils/request'
// **************我的工单**********************
export function addPromoter(data,method) { // 添加一级推广员
  return request({
    url: '/market-spread/spread-promoter',
    method: method,
   data
  })
}

export function promoterList (data) { //查询所有 1级推广员 列表
  return request({
    url: '/market-spread/spread-promoter/search',
    method: 'get',
    params: data
  })
}
export function getpromoterList (data) { //查询一级推广员 的二级推广员列表
  return request({
    url: '/market-spread/spread-promoter/list',
    method: 'get',
    params : data
  })
}
export function getpromoterDetails (promoterId) { //查询推广员详情
  return request({
    url: '/market-spread/spread-promoter/' + promoterId,
    method: 'get',
  })
}
export function delpromoter (promoterIds) { //删除推广员
  return request({
    url: '/market-spread/spread-promoter/' + promoterIds,
    method: 'DELETE',
  })
}
export function stopTask (promoterId) { //停止任务
  return request({
    url: '/market-spread/spread-promoter/suspend/' + promoterId,
    method: 'put',
  })
}
export function countTask (promoterId) { //统计
  return request({
    url: '/market-spread/spread-self/count/' + promoterId,
    method: 'get',
  })
}
export function userList (data) { //邀请详情列表
  return request({
    url: '/market-spread/spread-self/invite',
    method: 'get',
    params :data
  })
}
